<!DOCTYPE html>
<!--
 * Copyright (c) 2015 Ambroz Bizjak
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<html>
<head>
    <meta charset='utf-8' />
    <title>APrinter Configuration</title>
    <link href='bootstrap/css/bootstrap.min.css' rel='stylesheet'>
    <style>
    .compile_progress {
    }
    .modal-large {
        width: 100%;
        max-width: 1000px;
    }
    </style>
</head>
<body>
<div class='container'>
    <div class='row'>
        <div class='col-md-12'>
            <h2>APrinter Configuration Editor</h2>
            <p>Please see <a href="https://github.com/ambrop72/aprinter">https://github.com/ambrop72/aprinter</a>
               for more information about the APrinter firmware.
            </p>
            <div id='editor'></div>
            <h2>Local Storage</h2>
            <p>
                <button class='btn btn-primary' id='save_data'>Save Data</button>
                <button class='btn btn-primary' id='reload_data'>Load Last Saved Data</button>
                <button class='btn btn-primary' id='delete_saved_data'>Delete Saved Data</button>
            </p>
            <h2>Export and Import</h2>
            <p>
                <button class='btn btn-primary' id='export_data'>Export Data</button>
            </p>
            <p>
                <input type='file' id='import_data_file'>
                <button class='btn btn-primary' id='import_data'>Import Data</button>
            </p>
            <h2>Load Defaults</h2>
            <p>
                <button class='btn btn-primary' id='load_defaults'>Load Default Data</button>
            </p>
            <h2>Compilation</h2>
            <p>
                <button class='btn btn-primary' id='compile_start'>Start Compilation</button>
                <img class='compile_progress' style='visibility:hidden' src='Ajax-loader.gif'>
                <span class='compile_progress' style='visibility:hidden'>Compilation may take a few minutes. Please hold on :)</span>
            </p>
        </div>
    </div>
</div>
<div class="modal fade" id="error_modal" tabindex="-1" role="dialog" aria-labelledby="error_modal_label" aria-hidden="true">
  <div class="modal-dialog modal-large">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="error_modal_label"></h4>
      </div>
      <div class="modal-body" id="error_modal_body">
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
      </div>
    </div>
  </div>
</div>
<script src='jsoneditor.js'></script>
<script src='FileSaver.js'></script>
<script src='jquery.js'></script>
<script src='bootstrap/js/bootstrap.min.js'></script>
<script src='init.js'></script>
</body>
</html>
